Graphical modeling environments are products that enable a user to construct and analyze a model of a process or system. Examples of graphical modeling formalisms for which graphical modeling environments exist include time-based block diagrams, such as those supported by Simulink® from The MathWorks Inc., discrete event diagrams and reactive state machine diagrams, such as those supported by Stateflow® also available from The MathWorks, Inc., entity flow diagrams such as those supported by SimEvents, available from The MathWorks, Inc., data-flow diagrams, such as LabVIEW, available from National Instruments Corporation, and software diagrams and other graphical programming environments, such as Unified Modeling Language (UML) diagrams.
A graphical modeling environment can produce model-based designs in graphical form, such as a block diagram model, to specify computations, operations, or functionality that can be performed on computational hardware such as a general purpose processor, microcontroller, digital signal processor (DSP), field programmable gate array (FPGA), application specific integrated circuit (ASIC), asynchronous processor, analog hardware, quantum computer, or biocomputer. As a design specification, a model-based design can drive the building process of an implementation of the design. For instance, the model-based design can be a block diagram model that acts as a specification from which to automatically generate code to provide an executable for testing and verification on a target system.
Model-based designs represented by graphical models can be tested using simulation. The simulation may be provided by the modeling environment. For example, Simulink® from The MathWorks, Inc. of Natick, Mass., provides an environment for simulating graphical models to test the model-based design. Simulation may be used by a model designer to identify design issues during the design stage at the system level. Although simulation may be used to functionally verify some behavior of the design, simulation may not be exhaustive such that it covers all desired or unwanted circumstances and occurrences of design behavior.
Verification tools can be used to provide a more formal and comprehensive approach to testing and verifying a model-based design. Verification tools are available that apply various formal methods and techniques for providing comprehensive coverage and verifying the behavior of a model-based design under test. The verification tool may run a multitude of combinations of scenarios with a significant portion or all of the possible input values. Running comprehensive or multiple verification scenarios in a verification tool may be time consuming and resource intensive. The techniques and methods used by the verification tool may exercise behavior or functionality that is not of concern to the model-based designer or that is not practical or realistic in the intended application of the implementation of the model-based design. Alternatively, the designer may want to concentrate on a specific class of behavior. Therefore, it may be time consuming, resource intensive or inconvenient to obtain or review the results of the portion of the verification that is of interest to the designer or realistic for the design.
Typically, the configuration of the verification may be performed in the verification tool to run certain tests or verification scenarios desired for the design. The verification tool may be configured to limit the verification scenarios or to cover only a certain combination of occurrences. Generating verification scenarios in a verification tool may consume significant time and resources. The verification tool may have its own configuration environment and language different than the graphical modeling environment. As such, any verification scenario configuration and verification results may be described in terms of the form, language, and context of the verification tool. Thus, it may be challenging to relate the verification scenario configuration and verification results to the model-based design represented by the graphical model.
Previous solutions, such as application Ser. No. 11/096,528 entitled “Test Precondition Items for Automated Analysis and Test Generation,” filed on Mar. 31, 2005, have focused on providing preconditions on the verification of a design. This typically involves providing specific inputs or ranges of inputs to be used in the verification process. These provide the advantage of focusing the verification by placing constraints on the testing or verification. One disadvantage of such an implementation is that in order to test if a design behaves or functions as desired, the designer must provide the proper inputs or preconditions that are necessary to cause the design to provide a desired result or behavior.